package com.mqy.ssm.pojo;


import org.springframework.util.StringUtils;

public class Book implements ChcekNull {

    private long id;
    private String title;
    private String author;
    private long cid;

    @Override
    public boolean isEmpty() {
        /*title不为空*/
        return !StringUtils.hasText(title);
    }


    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }


    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }


    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }


    public long getCid() {
        return cid;
    }

    public void setCid(long cid) {
        this.cid = cid;
    }

    @Override
    public String toString() {
        return "Book{" +
                "id=" + id +
                ", title='" + title + '\'' +
                ", author='" + author + '\'' +
                ", cid=" + cid +
                '}';
    }
}
